/**
 * Thinking in Java
 *
 * @version 4th
 * @author Bruce Eckel
 * @see http://www.MindView.net
 */

/**
 *
 */
public class GenericMethods {
    public <T> void f(T x)   {
        System.out.println(x.getClass().getName());
    }

    /**
     * main()
     * 
     * @param args array of string arguments
     */
    public static void main(String[] args) {
        GenericMethods gm = new GenericMethods();
        gm.f("");
        gm.f(1);
        gm.f(1.0);
        gm.f(1.0F);
        gm.f('c');
        gm.f(gm);
    }
}

/**
 * output:
 * java.lang.String
 * java.lang.Integer
 * java.lang.Double
 * java.lang.Float
 * java.lang.Character
 * GenericMethods
 */